#设置源文件
set(MODBUS_SOURCES
        modbus_parser.c
)
set(MODBUS_HEADERS
        modbus_parser.h
)

#创建静态库
add_library(protocols_modbus STATIC ${MODBUS_SOURCES})

#设置包含目录
target_include_directories(protocols_modbus
        PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<INSTALL_INTERFACE:include>
        PRIVATE
        ${CMAKE_CURRENT_SOURCE_DIR}/src
)

#设置编译特性
#target_compile_features(protocols_modbus PUBLIC cxx_std_17)